@mixin font-size($size) {
  font-size: $size;
  font-size: calculateRem($size);
}

@mixin transition($args...) {
  -webkit-transition: $args;
  -moz-transition: $args;
  -ms-transition: $args;
  -o-transition: $args;
  transition: $args;
}

@font-face {
  font-family: 'icomoon';
  src: url('icomoon/icomoon.eot');
  src: url('icomoon/icomoon.eot#iefix') format('embedded-opentype'),
  url('icomoon/icomoon.ttf') format('truetype'),
  url('icomoon/icomoon.woff') format('woff'),
  url('icomoon/icomoon.svg#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}

[class^="icon-"], [class*=" icon-"], i {
  font-family: 'icomoon', "TIBch", "Classic Grotesque W01", "Helvetica Neue", Arial, "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, sans-serif;
  /*speak: none;*/
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  /* Better Font Rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-left-arrow:before {
  content: "\e658";
}

.icon-right-arrow:before {
  content: "\e659";
}

.icon-down-arrow:before {
  content: "\e65a";
}

.icon-up-arrow:before {
  content: "\e65b";
}

.icon-toggle:before {
  content: "\e65c";
}

.icon-search:before {
  content: "\e65d";
}

.icon-msg:before {
  content: "\e661";
}

.icon-close:before {
  content: "\e69e";
}

.icon-more:before {
  content: "\e6a0";
}

.icon-home:before {
  content: "\e900";
}

.icon-history:before {
  content: "\e901";
}

.icon-guestbook:before {
  content: "\e902";
}

.icon-about:before {
  content: "\e903";
}

.icon-archive:before {
  content: "\e904";
}

.icon-rss:before {
  content: "\e905";
}

body {
  padding-top: 80px;
  color: #ddd;
  background-color: #292929;
  background-image: url(./pics/triangles.png);
}

.copyright {
  color: #ffffff;
}

.footer {
  text-align: center;
}

.sidebar h1 {
  color: #ddd;
}

.sidebar {
  .well {
    ul {
      list-style: none;
    }

    ul {
      padding: 0;

      li {
        margin-top: .7em;
        line-height: 1em;

        a {
          text-decoration: none;
          border-bottom: 0.1em solid #bbb;
          outline: 0;
        }

        .category-list-count, .archive-list-count, .tag-list-count {
          margin-left: 0.5em;
          font-size: 0.8em;
          color: #999;
        }

        .category-list-count:before, .archive-list-count:before, .tag-list-count:before {
          content: ' (';
        }

        .category-list-count:after, .archive-list-count:after, .tag-list-count:after {
          content: ') ';
        }

        ul.category-list-child {
          list-style: none;
          padding: 0 0 0 1em;
        }
      }
    }

    ul {
      li {
        a.archive-list-link, a.post-list-link, a.links-list-link {
          border-bottom: 0;
        }
      }

      #archive-list-button {
        float: right;
        padding: 0 0 0 12px;
        color: #dcdcdc;
        cursor: pointer;
      }
    }
  }
}

.well {
  background-color: #444;
  box-shadow: 0px 0px 0px 0px, 0px 8px 16px rgba(0, 0, 0, 0.2);
  border: 0px;
  border-radius: 6px;

  .tags {
    padding: 1em;
    border-top: 1px solid;
    margin-top: 3em;

    a {
      margin-right: .5em;

      &:before {
        content: '#';
        display: inline-block;
      }
    }
  }

  .post-nav {
    overflow: hidden;
    border-top: 1px solid;
    white-space: nowrap;
    padding-top: 1em;
    padding-right: 1em;
    padding-left: 1em;

    a {
      display: inline-block;
      line-height: 25px;
      font-family: "TIBch", "Classic Grotesque W01", "Helvetica Neue", Arial, "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, sans-serif;
      font-size: 15px;
      color: #3CA2A2;
      border-bottom: none;
      float: left;

      &.pre {
        float: left;
      }

      &.pre:before {
        content: "<<";
      }

      &.next {
        float: right;
      }

      &.next:after {
        content: ">>";
      }

      &:hover {
        border-bottom: none;
        color: #222;
      }
    }
  }
}

.well > main-page {
  width: 75%;
}

.main-page {
  width: 75%;
}

//.well h1 {
//  color: #ddd;
//  font: {
//    size: 1.3em
//  }
//}/
h1 {
  font-size: 2em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.17em;
}

h4 {
  font-size: 1.12em;
}

h5 {
  font-size: .83em;
}

h6 {
  font-size: .75em;
}

.author {
  color: #ee4444;
}

.author a {
  color: #ee4444;
}

img {
  display: inline-block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

img + em {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

blockquote {
  color: #bbb;
  font-size: 1em;
}

.center-image {
  margin: 0 auto;
  display: block;
}

//********************************************************
//                    Links
//********************************************************
a {
  color: #3CA2A2;
}

a:hover {
  color: #3CA2A2;
  border-bottom: 1px solid transparent;
}

//********************************************************
//                    Social Links
//********************************************************
ul.social-media {
  text-align: center;
  padding: 0 0 10px 0;

  li {
    display: inline-block;
  }

  li > a {
    width: 45px;
    height: 45px;
    @include transition(color 0.2s);
    display: inline-block;
    color: white;

    &:hover {
      color: #3CA2A2;
    }
  }
}

//********************************************************
//                    Post
//********************************************************
h2.post-title {
  padding-top: 10px;
  text-align: left;
  //  font-size: 1.6em;
}

div.post-meta {
  border: 1px solid #666666;
  border-width: 1px 0;
  margin: 0 0 20px;

  ul {
    display: inline;
    padding-left: 0px;
    float: right;
  }

  ul > li {
    display: inline;
    padding: 0 0 5px 20px;
  }

  .post-time {
    display: inline;
    //    float: right;
  }

  .post-visitors-count {
    display: inline;
    float: right;
  }
}

.post-footer {
  height: 40px;
  display: table;
  width: 100%;
  position: relative;
  margin-top: 32px;
  text-align: center;

  a.pre {
    float: left;
  }

  a.pre:before {
    content: '< ';
  }

  a.next {
    float: right;
  }

  a.next:after {
    content: ' >';
  }
}

//    _  _     _
//   | \| |___| |_ ___
//   | .` / _ \  _/ -_)
//   |_|\_\___/\__\___|
//

.note {
  position: relative;
  border: 0;
  padding-left: 30px;
}

.note:before {
  content: "\f06a";
  font-size: 2em;
  font-family: FontAwesome;
  left: 0px;
  position: absolute;
  top: 0;
  color: #87CEFA;
}

.warning:before {
  content: "\f071";
  color: yellow;
}

//********************************************************
//                    Header
//********************************************************

nav a {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  font-size: 18px;
  font-family: ubuntu;
}

nav .navbar-toggle {
  margin: 13px 15px 13px 0;
}

.navbar-brand {
  font-size: 30px;
  color: #3CA2A2 !important;
}

nav.navbar.shrink {
  min-height: 25px;
}

nav.shrink a {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  font-size: 15px;
}

nav.shrink .navbar-brand {
  font-size: 25px;
  height: inherit;
}

nav.shrink .navbar-toggle {
  padding: 4px 5px;
  margin: 8px 15px 8px 0;
}

.navbar .navbar-nav {
  display: inline-block;
  float: right;
}

@media (min-width: 1000px) {
  .twoRow .navbar-collapse {
    clear: left;
  }
  .footer-distributed .footer {
    text-align: center;
  }
  .footer-distributed .footer {
    float: none;
    margin: 0 auto 20px;
  }
  .footer-distributed .footer {
    line-height: 1.8;
  }
}

//********************************************************
//                    Footer
//********************************************************
.footer-distributed {
  background-color: #292c2f;
  font: normal 16px sans-serif;
  padding: 20px 25px;
  margin-top: 80px;
  text-align: center;
  bottom: 0;
  left: 0;
  width: 100%;
  position: absolute;
}

/*----------------------------*\
|    Table of content, toc     |
\*----------------------------*/

.toc {
  background-color: 2 c2c2c;
  margin-left: -19px;
  margin-right: -19px;
  //  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.1), 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.box h3 {
  text-align: center;
  position: relative;
  top: 80px;
}

.box {
  width: 70%;
  height: 200px;
  background: #FFF;
  margin: 40px auto;
}

/*==================================================
 * Effect 1
 * ===============================================*/
.effect1 {
  -webkit-box-shadow: 0 10px 6px -6px #777;
  -moz-box-shadow: 0 10px 6px -6px #777;
  box-shadow: 0 10px 6px -6px #777;
}

.wrapper {
  min-height: 100%;
  position: relative;

  .side-button-wrap {
    position: fixed;
    _position: fixed;
    bottom: 123px;
    _bottom: auto;
    width: 40px;
    height: 40px;
    right: 10px;
    z-index: 1000;

    .side-button {
      width: 40px;
      height: 40px;
      line-height: 38px;
      text-align: center;
      right: 10px;
      cursor: pointer;
      font-size: 20px;
      color: #9c9c9c;
      background: whitesmoke;
      border: 1px solid #d9d9d9;
      margin-top: 10px;
      float: left;
    }

    .side-button:hover {
      background-color: #999999;
      color: #fff;
      text-decoration: none;
    }

    #to-comment-button {
      display: none;
    }
  }
}

.content {
  padding-bottom: 150px;
}

.post .post-descr, .article-entry {
  #toc {
    float: right;
    background-color: #eee;
    font-size: 0.8em;
    color: color-link;
    margin: 5px;
    .toc {
      list-style: none;
    }
  }

  pre {
    position: relative;
    margin: 0;
    padding: 1em;
    overflow-x: auto;
    word-wrap: normal;
    border: none;
    white-space: pre;
    -webkit-box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.1), 0 -1px 0 rgba(0, 0, 0, 0.5);
    -moz-box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.1), 0 -1px 0 rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.1), 0 -1px 0 rgba(0, 0, 0, 0.5);
    background-color: #333;

    .hljs {
      background: none;
    }
  }

  table {
    width: 100%;
    border: 1px solid #333;
    margin: 15px 0;
    border-collapse: collapse;

    tr, td {
      height: 35px;
    }

    thead {
      tr {
        background: #333;
      }
    }

    td, th {
      border: 1px solid #212121;
      padding: 0 10px;
    }
  }

  h1 {
    border-bottom: double;
  }

  h2 {
    border-bottom: 1px solid;
  }
}

/*==================================================
 * Comment
 * ===============================================*/
#vcomment {
  .vwrap {
    .vheader .vinput,
    .vedit > .vctrl > span,
    .vedit > .vpreview > p {
      color: #ddd;
    }

    input::-webkit-input-placeholder,
    textarea::-webkit-input-placeholder {
      /* WebKit browsers */
      color: #bdbdbd;
    }

    input:-moz-placeholder,
    textarea:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      color: #bdbdbd;
    }

    input::-moz-placeholder,
    textarea::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      color: #bdbdbd;
    }

    input:-ms-input-placeholder,
    textarea:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      color: #bdbdbd;
    }
  }

  .vlist {
    .vcard > .vh > .vcontent > p {
      color: #ddd;
    }

    input::-webkit-input-placeholder,
    textarea::-webkit-input-placeholder {
      /* WebKit browsers */
      color: #bdbdbd;
    }

    input:-moz-placeholder,
    textarea:-moz-placeholder {
      /* Mozilla Firefox 4 to 18 */
      color: #bdbdbd;
    }

    input::-moz-placeholder,
    textarea::-moz-placeholder {
      /* Mozilla Firefox 19+ */
      color: #bdbdbd;
    }

    input:-ms-input-placeholder,
    textarea:-ms-input-placeholder {
      /* Internet Explorer 10+ */
      color: #bdbdbd;
    }
  }
}
